package com.ys.zuul.zuulgatewaydemo;

import org.springframework.boot.autoconfigure.web.ErrorController;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>@description:</p>
 *
 * @author yangshuang
 * @version 1.0
 * @date 18-5-14 下午10:46
 */
@RestController
public class ErrorHandlerController implements ErrorController {


    @Override
    public String getErrorPath() {
        return "/error";
    }


    @GetMapping("/error")
    public String error() {
        return "出现异常";
    }
}
